package com.gestocasa.model;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class DateValue extends Value {

	private Date value;
	
	public DateValue() {
		this(null);
	}
	
	public DateValue(Date value) {
		this.value = value;
	}

	public Date getValue() {
		return value;
	}

	public void setValue(Date value) {
		this.value = value;
	}
	
	@Override
	public String toString() {
		if(value == null) {
			return "";
		}
		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
		return sdf.format(value);
	}
}
